import React, { Component } from 'react';
import { View, Text,Image } from 'react-native';
import { TabView } from "teaset";
import { TabNavigator, TabBarBottom } from 'react-navigation';

import Icon from 'react-native-vector-icons/FontAwesome';

import Home from './views/Home';
import More from './views/More';

const RootStack = TabNavigator({
  Home: {
    screen: Home,
    navigationOptions:{
      title:'Home',
      tabBarIcon: ({tintColor})=>(<Icon name="home" size={26} color={tintColor} />)
    }
  },
  More: {
    screen: More,
    navigationOptions: {
      title: 'More',
      tabBarIcon: ({tintColor})=>(<Icon name="book" size={24} color={tintColor} />)
    }
  }
}, {
    tabBarPosition: 'bottom',
    tabBarComponent: TabBarBottom,
    // 兼容IOS  and Android
    swipeEnabled: false,
    animationEnabled : false,
    tabBarOptions:{
      activeTintColor:'#ec4d3d'
    }
});

export default class App extends Component {
  constructor(props) {
    super(props);
  }
  
  render() {
    return (
      <RootStack />
    );
  }
}

